<template>
	<view>
		<view class="model_card">
			<view class="model_card_content uni-flex">
				<view class="model_card_img">
					<image :src=personInfo.HeadImageURL mode="widthFix" style="width: 100%;height: 100%;"></image>
				</view>
				<view class="model_card_info uni-flex zcFlex_column uni-flex-item">
					<!-- <view class="">测试<view class=""></view></view> -->
					<view class="">{{personInfo.ShopOrganName}}</view>
					<view class="uni-flex zcJustifyC_between">
						<view class="">服务天数：{{personInfo.ServiceDays}}</view>
						<view class="">客户数：{{personInfo.CusNumbers}}</view>
					</view>
					<view class="">开单数：{{personInfo.OpBillNumbers}}</view>
				</view>
				<view class="model_card_right uni-flex" style="flex:0 0 120upx">
					<!-- <view class="iconfont icon-tuichu"></view> -->
					<!-- 退出登录 -->
				</view>
			</view>
		</view>
		
		<view class="card mlr40 uni-flex zcFlex_column">
			<view class="uni-flex zcJustifyC_between flexWrap">
				<block v-for="(item,index) in personInfo.row1" :key="index" >
					<view class="card_item uni-flex zcFlex_column zcJustifyC_center">
						<view class="uni-flex zcAlignI_end zcJustifyC_center"><view class="fs32">{{item.Fini}}</view><view v-if='item.IsRate' style="font-size: 22upx;">%</view></view>
						<view class="uni-flex zcJustifyC_center fs20">目标：{{item.Plan}} <view v-if='item.IsRate' style="font-size: 15upx;position:relative;top:5upx">%</view></view>
						<view class="uni-flex zcJustifyC_center fs24">{{item.TagName}}</view>
					</view>
				</block>
			</view>
			<view class="uni-flex zcJustifyC_between flexWrap">
				<block v-for="(item,index) in personInfo.row2" :key="index">
					<view class="card_item uni-flex zcFlex_column zcJustifyC_center">
						<view class="uni-flex zcAlignI_end zcJustifyC_center"><view class="fs32">{{item.Fini}}</view><view v-if='item.IsRate'>%</view></view>
						<view class="uni-flex zcJustifyC_center fs20">目标：{{item.Plan}} <view v-if='item.IsRate' style="font-size: 16upx;position:relative;top:5upx">%</view></view>
						<view class="uni-flex zcJustifyC_center fs24">{{item.TagName}}</view>
					</view>
				</block>

			</view>
		</view>
		<view class="card mt40 mb20 uni-flex zcFlex_column">
			<view class="card_title">工作记录</view>
			<view class="uni-flex">
				<navigator url="../myCustomer/myCustomer" class="uni-flex zcFlex_column zcAlignI_center zcJustifyC_center uni-flex-item fs24">
					<view class="card_img">
						<image src="../../static/myCustomer-2019-11-7.png" mode="widthFix" style="width: 100%;height: 100%;"></image>
					</view>
					我的客户
				</navigator>
				<navigator url="../myOpenOrder/myOpenOrder" class="uni-flex zcFlex_column zcAlignI_center zcJustifyC_center uni-flex-item fs24">
					<view class="card_img">
						<image src="../../static/openOrder-2019-11-7.png" mode="widthFix" style="width: 100%;height: 100%;"></image>
					</view>
					开单信息
				</navigator>
				<navigator url="../myCheck/myCheck" class="uni-flex zcFlex_column  zcAlignI_center zcJustifyC_center uni-flex-item fs24">
					<view class="card_img">
						<image src="../../static/giveup-2019-11-7.png" mode="widthFix" style="width: 100%;height: 100%;"></image>
					</view>
					核销记录
				</navigator>
			</view>
		</view>
		<view class="card uni-flex zcFlex_column">
			<navigator url="../replaceTelephone/replaceTelephone" class="card_list iconfont icon-shouji1 icon-shouji icon-afyou">
				更改手机
			</navigator>
			<navigator url="../aboutUs/aboutUs" class="card_list iconfont icon-guanyuwomen icon-tanhao icon-afyou">
				关于我们
			</navigator>
<!--           <navigator url="../voiceDemo/voiceDemo" class="card_list iconfont icon-guanyuwomen icon-tanhao icon-afyou">
            	语音合成
            </navigator> -->
						<view class="f-side" style="height: 70upx;padding: 0 16upx 0 16upx;">
							<view class="flex"><view>当前版本号</view></view>
							<view>{{AppVer||0}}</view>
						</view>
		</view>
		
	</view>
</template>

<script>
	let _this;
	export default {
		data() {
			return {
				personInfo:{}   ,//个人信息
				AppVer:""
			}
		},
		created(){
			_this = this;
			_this.getInfo()
			
		},
onShow(){
	_this.getInfo();
	_this.AppVer = uni.getStorageSync('AppVer')
	console.log('_this.AppVer',_this.AppVer);
	
},
		methods: {
			getInfo(){
				//getSaleManInfo
				console.log(_this);
					_this.$ZcPublic.Server.Post({
						IsNeedLogin: true,
						Paras: {
							Name: 'Uni_Partner_Detail',
							Action: 'getSaleManInfo',
							data: {
							}
						},
						Callback: _this.cb_getInfo,
						Scope: _this
					})
			},
			cb_getInfo(resJson, scope) {
					console.log("个人信息", resJson)
					if (resJson.success) {
						_this.personInfo = resJson.data
					} else {
						uni.showModal({
							title: '温馨提示',
							content: resJson.msg,
							showCancel: false
						})
					}
			}
		}
	}
</script>

<style>
	.model_card{background-color: #3CA4F9;color: #FFFFFF;}
	.model_card_content{padding-bottom: 160upx;padding-top: 40upx;}
	.model_card_img{width: 120upx;height: 120upx;margin: 20upx;margin-left: 40upx;border-radius: 100%;overflow: hidden;border: 4upx solid #FFFFFF;}
	.model_card_info view{font-size: 24upx;}
	.model_card_info>view:first-child{font-size: 28upx!important;}
	.model_card_right{padding:10upx 40upx;font-size: 24upx;}
	.model_card_right view{line-height: 1.4;}
	.icon-tuichu:before{
		/* transform: rotate(90deg); */
		margin-right: 10upx;
		font-size: 32upx;
	}
	
	.card{background-color: #FFFFFF;border-radius: 20upx;margin: 10upx 20upx;padding: 20upx;padding-bottom: 20upx;box-shadow: 2upx 6upx 6upx #e5e5e5;}
	.card view{line-height: 1.4;}
	.card_item{padding-top: 20upx;width: 25%;}
	.fs32{font-size: 32upx!important;}
	.fs20{font-size: 20upx!important;}
	.fs24{font-size: 24upx!important;}
	.card>view:first-child .card_item{padding-top: 0;}
	.card>view .card_item:nth-child(Odd) view{color: #3CA4F9;}
	.card>view .card_item:nth-child(6) view{color: #3CA4F9;}
	.card>view .card_item:nth-child(8) view{color: #3CA4F9;}
	.card>view .card_item:nth-child(5) view{color: #333333;}
	.card>view .card_item:nth-child(7) view{color: #333333;}
	
	.card:first-child{margin: 0 40upx;}
	.card{position: relative;bottom: 150upx;}
	.card_title{position: relative;display: flex;align-items: center;padding-left: 16upx;margin-bottom: 20upx;}
	.card_title:before{content: '';width: 8upx;background-color: #3CA4F9;border-radius: 4upx;height: 70%;position: absolute;left: 0upx;}
	.card_img{width: 40%;padding: 10upx;}
	.card_list{padding: 10upx 40upx;}
	
	.mt40{margin-top: 40upx;}
	.mb20{margin-bottom: 20upx;}
	.mlr40{margin: 0 40upx;}
	.icon-afyou:after{
		content: "\e778";
		position: absolute;
		color: #ccc;
		right: 10upx;
	}
/* 	.icon-shouji1:before,.icon-guanyuwomen:before{
		position: relative;
		left: -30upx;
	} */

	.icon-shouji:before ,.icon-tanhao:before{
		color: #055EFF !important;
		position: relative;
		left: -25upx;
	}
	.icon-shouji1{
		padding-left: 30upx;
	}
		.icon-shouji:before{
		font-size: 38upx;
		left: -22upx;
		/* transform: scale(1.4); */
		top:5upx
	}
</style>
